home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 8: LINUX Games / Linux Cubed Series 8 - LINUX Games.iso / games / video / fly8111-.000 / fly8111- / fly8 / COMMON / fly8udp.h < prev    next >
C/C++ Source or Header  |  1979-12-31  |  1KB  |  58 lines

  1. /* --------------------------------- fly8udp.c ------------------------------ */
  2.  
  3. /* This is part of the flight simulator 'fly8'.
  4.  * Author: Eyal Lebedinsky (eyal@ise.canberra.edu.au).
  5. */
  6.  
  7. /* Common header for Fly8 udp programs.
  8. */
  9.  
  10. #include <stdio.h>
  11. #include <stdlib.h>
  12. #include <errno.h>
  13. #include <string.h>
  14. #include <sys/types.h>
  15. #include <fcntl.h>
  16.  
  17. #ifdef WATTCP
  18. #include "tcp.h"
  19. #else
  20. #include <unistd.h>
  21. #include <sys/socket.h>
  22. #include <netinet/in.h>
  23. #include <netdb.h>
  24. #endif
  25.  
  26.  
  27. /* These are from fly.h.
  28. */
  29. #ifndef LADDRESS
  30. #define LADDRESS    6
  31. #endif
  32.  
  33. /* The following definitions are shared with the server programs fly8srv.c
  34.  * and udpcli.c.
  35. */
  36. #define SOCK_FLY8    SOCK_DGRAM
  37. #define IPPORT_FLY8    0xf8f8
  38.  
  39. #ifdef PHDATA
  40.  
  41. #define PHLEN        (PHDATA-2)
  42. #define PHFROM        (PHLEN-LADDRESS)
  43. #define PHTO        (PHFROM-LADDRESS)
  44. #define PHEAD        PHTO
  45.  
  46. #else
  47.  
  48. #define PHTO        PHEAD
  49. #define PHFROM        (PHTO+LADDRESS)
  50. #define PHLEN        (PHFROM+LADDRESS)
  51. #define PHDATA        (PHLEN+2)
  52.  
  53. #endif
  54.  
  55. #define PHSIZE        (PHDATA-PHEAD)
  56.  
  57. #define ADMIN_ADDR    {0, 0, 0, 0, 0x12, 0x34}
  58.